Skip to content

Add SYCL support#210

Open
alvarovm wants to merge 22 commits intolab-cosmo:mainfrom
alvarovm:main
Open

Add SYCL support#210
alvarovm wants to merge 22 commits intolab-cosmo:mainfrom
alvarovm:main

Conversation

@alvarovm
Copy link
Copy Markdown

I added support to SYCL devices. I include example_sycl and benchmark_sycl. I tested this on an Intel laptop with CPU and GPU (Xe Iris) and Intel GPU Ponte Vecchio (~Max 1550), I expect this could also run in Nvidia, AMD and Intel Ultra, but I have not tested.
I tested this with symmetrix and ran MD with MACE models. OK.

Copy link
Copy Markdown
Contributor

@Luthaf Luthaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for this PR, this is amazing!

I have a couple of high level questions/suggestions about code organization before digging deeper.

Is the plan to also have the sycl backend available through Python / TorchScript / Jax?

@alvarovm
Copy link
Copy Markdown
Author

alvarovm commented Feb 24, 2026

I have not tried Python / TorchScript / Jax. I could make it work for the examples. I have not ported the backward method, which would be instrumental for training workloads. I am working on that.
I am using sphericart now only for inference of MACE models in LAMMPS in kokkos. I am very interested in learning more about metatensor, sphericart is the only piece that I see with hardcoded cuda, the rest can be managed switching device=xpu for Intel gpus. Thanks for the comments. I will make changes.

@alvarovm
Copy link
Copy Markdown
Author

We have 20% of speed up when we use the SYCL version of sphericart in symmetrix with LAMMPS (42k atmos, 100 steps, double precision)

Build Performance (ns/day) Speedup vs vanilla
Vanilla (PVC-6 tiles) 1.187 -
SYCL (PVC-6 tiles) 1.497 26.10%
SYCL (PVC-12 tile) 1.765 48.70%

Let me know if there is anything else to change.

@frostedoyster
Copy link
Copy Markdown
Collaborator

@alvarovm Thank you very much for the contribution! We're looking through the code, hopefully we'll be able to make some finishing touches and merge it relatively soon

@frostedoyster
Copy link
Copy Markdown
Collaborator

I'm going to revert all the DTYPE -> T changes for the moment to make things easier to review. We'll open a different PR for them later

@frostedoyster
Copy link
Copy Markdown
Collaborator

cscs-ci run

@frostedoyster frostedoyster requested a review from Luthaf March 28, 2026 04:01
@frostedoyster
Copy link
Copy Markdown
Collaborator

cscs-ci run

@frostedoyster frostedoyster changed the title Adding SYCL support Add SYCL support Mar 28, 2026
@alvarovm
Copy link
Copy Markdown
Author

I have not tested the backward function, and the pytorch integration, I will complete this during April.

Inference with C++ and Kokkos is OK, we are using this for production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants